(debian-policy.info)Restrictions on objects in source packages<2>


Up: Unpacking a Debian source package without dpkg-source
Enter node , (file) or (file)node

15.4.1 Restrictions on objects in source packages
-------------------------------------------------

The source package may not contain any hard links, (1) (2) device
special files, sockets or setuid or setgid files.  (3)

The source packaging tools manage the changes between the original and
Debian source using ‘diff’ and ‘patch’.  Turning the original source
tree as included in the ‘.orig.tar.gz’ into the Debian package source
must not involve any changes which cannot be handled by these tools.
Problematic changes which cause ‘dpkg-source’ to halt with an error when
building the source package are:

   - Adding or removing symbolic links, sockets or pipes.

   - Changing the targets of symbolic links.

   - Creating directories, other than ‘debian’.

   - Changes to the contents of binary files.

Changes which cause ‘dpkg-source’ to print a warning but continue anyway
are:

   - Removing files, directories or symlinks.  (4)

   - Changed text files which are missing the usual final newline
     (either in the original or the modified source tree).

Changes which are not represented, but which are not detected by
‘dpkg-source’, are:

   - Changing the permissions of files (other than ‘debian/rules’) and
     directories.

The ‘debian’ directory and ‘debian/rules’ are handled specially by
‘dpkg-source’ - before applying the changes it will create the ‘debian’
directory, and afterwards it will make ‘debian/rules’ world-executable.

   ---------- Footnotes ----------

   (1) This is not currently detected when building source packages, but
only when extracting them.

   (2) Hard links may be permitted at some point in the future, but
would require a fair amount of work.

   (3) Setgid directories are allowed.

   (4) Renaming a file is not treated specially - it is seen as the
removal of the old file (which generates a warning, but is otherwise
ignored), and the creation of the new one.


automatically generated by info2www version 1.2.2.9